<?php require VIEW_PATH."/header.php";?>
<body>

<div class="hd-menu-list">
    <ul>
        <li class="active"><a href="<?php echo U('index')?>">备份列表</a></li>
        <li><a href="<?php echo U('backup')?>">备份数据</a></li>
    </ul>
</div>

<table class="hd-table hd-table-list">
    <thead>
    <tr>
        <td class="hd-w100">目录名称</td>
        <td>备份时间</td>
        <td class="hd-w100">操作</td>
    </tr>
    </thead>
    <tbody>
    <?php foreach ($data as $v){?>
    <tr>
        <td><?php echo $v['basename']?></td>
        <td>
            <?php echo date('Y/m/d H:i:s',$v['filemtime'])?>
        </td>
        <td class="hd-w100">
            <a href="<?php echo U('recovery',array('dir'=>$v['basename']))?>">还原</a> |
            <a href="javascript:del('<?php echo $v['basename']?>')">删除</a>
        </td>
    </tr>
    <?php }?>
    </tbody>
</table>
<script>
    function del(dir)
    {
        if(confirm('确定删除吗？'))
        {
            location.href='<?php echo U("del")?>&dir='+dir;
        }
    }
</script>
</body>
</html>

